@extends('layouts.tankuang')

@section('content')
    <!--startprint-->
    <form name="add_form" id="add_form" method="post" action="{{url('admin/units/edit',$id)}}" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div id="div_print">
            <h2 class="text-center mg_b36 mg_t25" style="font-weight: bold;">企事业单位基本情况登记表</h2>
            <table class="table-form table-border w mg-auto">
                <tbody>
                <tr>
                    <td class="font-bd" align="center">单位名称</td>
                    <td colspan="3"><input type="text" class="form-input w" value="{{$re->name}}" name="name"></td>
                    <td rowspan="5" class="font-bd" align="center">单位图片</td>
                    <td rowspan="5" style="width: 190px;">
                        @if($re->pic != '')
                            <div class="example" style="width: 190px;"><img src="{{ URL::asset('/') }}{{$re->pic}}" class="img-rounded" alt="" style="width: 190px;border-radius: 0;"></div>
                        @endif
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">市、区、派出所</td>
                    <td colspan="3"><input type="text" class="form-input w" value="{{getValue($re->city,'area','id','name')}}{{getValue($re->area,'area','id','name')}}{{getValue($re->org_id,'area','id','name')}}" disabled></td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">详细地址</td>
                    <td colspan="3"><input type="text" class="form-input"  value="{{$re->address}}" name="address"></td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">企业性质</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->xingzhi}}" name="xingzhi">
                    </td>
                    <td class="font-bd" align="center">邮编</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->post_code}}" name="post_code">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">法人姓名</td>
                    <td>
                        <input type="text" class="form-input" value="@if($faren){{$faren->name}}@endif" disabled>
                    </td>
                    <td class="font-bd" align="center">法人联系电话</td>
                    <td>
                        <input type="text" class="form-input" value="@if($faren){{$faren->phone}}@endif" disabled>
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">分管保卫领导</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->fgbwld_name}}" name="fgbwld_name">
                    </td>
                    <td class="font-bd" align="center">职务</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->fgbwld_post}}" name="fgbwld_post">
                    </td>
                    <td class="font-bd" align="center">电话</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->fgbwld_phone}}" name="fgbwld_phone">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">保卫机构名称</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->bwjg_name}}" name="bwjg_name">
                    </td>
                    <td class="font-bd" align="center">人数</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->bwjg_num_of_peo}}" name="bwjg_num_of_peo">
                    </td>
                    <td class="font-bd" align="center">保卫专干</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->bwjg_zhuangan}}" name="bwjg_zhuangan">
                    </td>
                </tr>
                {{--<tr>
                    <td class="font-bd" align="center">护卫队人数</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->hwd_num_of_peo}}" name="hwd_num_of_peo">
                    </td>
                    <td class="font-bd" align="center">保安数</td>
                    <td colspan="3">
                        <input type="text" class="form-input" value="{{$re->baoan_num_of_peo}}" name="baoan_num_of_peo">
                    </td>
                </tr>--}}
                <tr>
                    <td class="font-bd" align="center">保卫负责人</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->bwfzr_name}}" name="bwfzr_name">
                    </td>
                    <td class="font-bd" align="center">职务</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->bwfzr_post}}" name="bwfzr_post">
                    </td>
                    <td class="font-bd" align="center">电话</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->bwfzr_phone}}" name="bwfzr_phone">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">职工总数</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->zhigong_num_of_peo}}" name="zhigong_num_of_peo">
                    </td>
                    <td class="font-bd" align="center">在职人数</td>
                    <td colspan="3">
                        <input type="text" class="form-input" value="{{$re->zaizhi_num_of_peo}}" name="zaizhi_num_of_peo">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">固定资产</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->gdzc}}" name="gdzc">
                    </td>
                    <td class="font-bd" align="center">经营状况</td>
                    <td colspan="3">
                        <input type="text" class="form-input" value="{{$re->jyzk}}" name="jyzk">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">重点要害部位</td>
                    <td>
                        <input type="text" class="form-input" value="{{$buwei_num}}" disabled>（处）
                    </td>
                    <td class="font-bd" align="center">要害部位工作人员数</td>
                    <td colspan="3">
                        <input type="text" class="form-input" value="{{$gzry_num}}" disabled>（人）
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">重点维稳工作对象</td>
                    <td>
                        <select class="w150 input_all" name="zdwwgzdx">
                            <option value="有" @if($re->zdwwgzdx == '有') selected @endif>有</option>
                            <option value="无" @if($re->zdwwgzdx == '无') selected @endif>无</option>
                        </select>
                    </td>
                    <td class="font-bd" align="center">数量</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->zdwwgzdx_num_of_peo}}" name="zdwwgzdx_num_of_peo">（人）
                    </td>
                    <td class="font-bd" align="center">其中骨干</td>
                    <td>
                        <input type="text" class="form-input" value="{{$re->zdwwgzdx_gg_num_of_peo}}" name="zdwwgzdx_gg_num_of_peo">（人）
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">单位类型</td>
                    <td>
                        <select class="w150 input_all" name="type">
                            <option value="">请选择单位类型</option>
                            @foreach($type as $k=>$v)
                                <option value="{{$v->id}}" @if($re->type == $v->id) selected @endif>{{$v->name}}</option>
                            @endforeach
                        </select>
                    </td>
                    <td class="font-bd" align="center">经度</td>
                    <td>
                        <input type="text" class="form-input" name="jd" value="{{$re->jd}}">
                    </td>
                    <td class="font-bd" align="center">纬度</td>
                    <td>
                        <input type="text" class="form-input" name="wd" value="{{$re->wd}}">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">重点级别设置</td>
                    <td>
                        <select class="w150 input_all" name="is_imp">
                            <option value="0" @if($re->is_imp == 0) selected @endif>非重点</option>
                            <option value="1" @if($re->is_imp == 1) selected @endif>省级</option>
                            <option value="2" @if($re->is_imp == 2) selected @endif>市级</option>
                            <option value="3" @if($re->is_imp == 3) selected @endif>县级</option>
                            <option value="4" @if($re->is_imp == 4) selected @endif>乡级</option>
                        </select>
                    </td>
                    <td class="font-bd" align="center">组织机构代码</td>
                    <td>
                        <input type="text" class="form-input" name="zuzhijigou" value="{{$re->zuzhijigou}}">
                    </td>
                    <td class="font-bd" align="center">责任民警</td>
                    <td>
                        <input type="text" class="form-input" value="">
                    </td>
                </tr>
                <tr>
                    <td class="font-bd" align="center">备注</td>
                    <td colspan="5">
                        <textarea class="textarea">{{$re->remark}}</textarea>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="w wbt mg_t25 text-center">
	            <button type="button" class="easyui-linkbutton dsp" data-options="iconCls:'icon-no'" onclick="$('#w').window('close')">关闭</button>
	        </div>

        </div>
    </form>
    <br>

    <link rel="stylesheet" href="{{ URL::asset('/') }}css/zoomify.min.css">
    <script src="{{ URL::asset('/') }}js/zoomify.min.js"></script>
    <script type="text/javascript">
        $('.example img').zoomify(function(){
            $(this).css({'position':'absolute','top':0,'bottom':0,'left':0,'right':0,'z-index':'9999',})
        });
    </script>
@stop